Service Bus (1 / 26): A healthcare provider is developing a telemedicine application. The application is designed to connect patients with doctors for online consultations. The application needs to follow this workflow:
- A patient selects the medical specialty they need consultation in (e.g., Cardiology, Dermatology).
- Consultation requests are sent to all available doctors in that specialty.
- Only consultation requests for the selected specialty will appear for the doctor.
- The first doctor to accept the consultation removes it from the list of available consultations.
Which of the following actions would you implement for this requirement?
Answer:
You should first create a Service Bus Namespace. A single namespace is sufficient to manage all the topics and subscriptions. Creating a namespace for each medical specialty would be a maintenance overhead and difficult to manage programmatically.
A single Service Bus topic is ideal. If you create multiple topics for each medical specialty, you would have to send a consultation request to all topics. Removing a consultation once accepted would become complicated.
Create a Service Bus Subscription for each medical specialty: This allows doctors to subscribe to topics that are relevant to their specialty. You can create rules based on the doctor's specialty and area to filter messages.